package com.gitee.zhanyao.codebase.java.cloud.serverb.controller;

import com.gitee.zhanyao.codebase.java.cloud.serverb.feignclient.ServerAClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private ServerAClient serverAClient;

    @GetMapping("/sayHello")
    public String sayHello() {
        return "hello Server B!";
    }

    @GetMapping("/sayServerAHello")
    public String sayServerAHello() {
        return serverAClient.sayHello();
    }

}
